
#pragma once

#include <Ogre.h>
#include <OIS/OIS.h>
#include <memory>


class GameState;
class InGameState;
class KeysState;


class CameraControl
{
	bool mDbgShowCameraPosition;

	bool mFreeCamera;
	Ogre::Camera * mCamera;

	float mSpeed;
	float mRotSpeed;

public:


	//! Constructs a CameraControl object taking a camera as a parameter.
	//!
	CameraControl(Ogre::Camera * cam);

	//! Returns true if the camera is free, false  otherwise.
	//!
	bool IsFreeCamera() const;

	//! Sets whether the camera is free or not.
	//!
	//! @param b Yes or no.
	void IsFreeCamera(bool b);

	//! Partially updates the camera. Should be called every frame or so.
	//! 
	//! @param gs Pointer to the game state.
	//! @param timeSinceLastFrame Time ellapsed since last frame.
	//! @param ks Reference to the current KeysState object.
	//! @param ms Reference to the current MouseState.
	//! @param mgr Reference to the SceneManager.
	void Update(IGameState * gs, float timeSinceLastFrame, KeysState const & ks, OIS::MouseState 
		const & ms, Ogre::SceneManager * mgr);


};